home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Container Common / basestrm.h < prev    next >
Text File  |  1997-01-03  |  1KB  |  41 lines

  1. //
  2. //  BASESTRM.H
  3. //
  4. //  Copyright (C) Microsoft Corporation, 1996
  5. //
  6. //  Declares classes that wrap different functionality that require the use of
  7. //  Netscape streams.
  8. //
  9.  
  10. class CNetscapeStreamNotify
  11. {
  12. public:
  13.     //  After calling NPN_GetURL, we don't have a NPStream structure to attach
  14.     //  our notification object to, so we must wait until NPP_NewStream and scan
  15.     //  the list of unattached objects.  We detect a match by comparing each
  16.     //  notification object's URL against the URL provided to the NPP_NewStream
  17.     //  callback.
  18.     CNetscapeStreamNotify *m_pNextUnattached;
  19.     LPOLESTR m_pszURL;
  20.  
  21.     inline CNetscapeStreamNotify();
  22.     virtual ~CNetscapeStreamNotify();
  23.     virtual NPError OnNewStream(NPMIMEType type, NPStream *stream, NPBool
  24.         seekable, uint16 *stype);
  25.     virtual int32 OnWriteReady(NPStream *stream);
  26.     virtual int32 OnWrite(NPStream *stream, int32 offset, int32 len, void
  27.         *buffer);
  28.     virtual NPError OnDestroyStream(NPStream *stream, NPError reason) = 0;
  29.     virtual void OnStreamAsFile(NPStream *stream, const char* fname);
  30.  
  31. protected:
  32.     STGMEDIUM    mStorageMedium;
  33. };
  34.  
  35. inline
  36. CNetscapeStreamNotify::CNetscapeStreamNotify()
  37. {
  38.     m_pNextUnattached = NULL;
  39.     m_pszURL = NULL;
  40. }
  41.